package com.tencent.wxcloudrun.vo.response.wx;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Ryan Zhao
 *         <p>
 *         Copyright: Copyright (c) 2023
 *         </p>
 * @version 1.0
 * @date 2023-08-29 14:55
 * @description: 微信支付请求出参
 */
@NoArgsConstructor
@Data
@ApiModel(value = "WxPayResponse", description = "微信支付请求出参")
public class WxPayResponse {

    @JsonProperty("errcode")
    private Integer errcode;

    @JsonProperty("errmsg")
    private String errmsg;

    @JsonProperty("respdata")
    private RespdataDTO respdata;

    @NoArgsConstructor
    @Data
    public static class RespdataDTO {

        @JsonProperty("return_code")
        private String returnCode;

        @JsonProperty("return_msg")
        private String returnMsg;

        @JsonProperty("appid")
        private String appid;

        @JsonProperty("mch_id")
        private String mchId;

        @JsonProperty("sub_appid")
        private String subAppid;

        @JsonProperty("sub_mch_id")
        private String subMchId;

        @JsonProperty("nonce_str")
        private String nonceStr;

        @JsonProperty("sign")
        private String sign;

        @JsonProperty("result_code")
        private String resultCode;

        @JsonProperty("err_code")
        private String errCode;

        @JsonProperty("err_code_des")
        private String errCodeDes;

        @JsonProperty("trade_type")
        private String tradeType;

        @JsonProperty("prepay_id")
        private String prepayId;

        @JsonProperty("payment")
        private PaymentDTO payment;

        @NoArgsConstructor
        @Data
        public static class PaymentDTO {

            @JsonProperty("appId")
            private String appId;

            @JsonProperty("timeStamp")
            private String timeStamp;

            @JsonProperty("nonceStr")
            private String nonceStr;

            @JsonProperty("package")
            private String packageX;

            @JsonProperty("signType")
            private String signType;

            @JsonProperty("paySign")
            private String paySign;
        }
    }
}
